#!/bin/bash
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/environment

$DIR/check
if [ $? -eq 0 ]; then
    # Does not expose any ports, so you can use the runserver at the same time.
    docker-compose run --publish 1337:1337 --rm --name=polyaxon_sanic web /bin/bash ./web/sanic.sh --host=0.0.0.0 --port=1337 --workers=1
fi
